#include <graphics.h>
#include <stdio.h>
#include <math.h>

FILE *inf;

int main()
{
  initwindow(1100,810);
  moveto(50,50); 
  float N,f[100],q;
  int i,k,y,x,s,j;
  inf = fopen("output.txt", "rt"); 
  for(i=0;i<40;i=i+1)
  {
    fscanf (inf,"%f",&N);    
    f[i]=N;
  }
  k=3;
  k=k-1;
  s=k;
  for(i=0;i<10;i=i+1)
  {
    if(k==3)q=700;
    if(k==0)q=800000;
    if(k==1)q=400000;
    if(k==2)q=800000;
    N=f[k];    
    if(N==0)break;
    N=10*log(N); 
    y=300-(int)N;
    x=50+50*i;
    fillellipse(x, y, 3, 3); 
    k=k+4;    
    j=i; 
  } 
  N=10*log(f[s]);
  y=300-int(N);
  moveto(50,y);
  N=10*log(f[k-4]);
  y=300-int(N);
  lineto(50+50*j,y);
  moveto(10,100);
  lineto(10,800);
  moveto(10,300);
  lineto(900,300);
  lineto(895,295);
  moveto(900,300);  
  lineto(895,305);
  moveto(10,100);      
  lineto(15,105);
  moveto(10,100);    
  lineto(5,105);
  getchar();
  closegraph();
  return 0;
}
